17/11/2024 - 23/11/2024

18/11/2024 20:27

I started trying to get nalu's UDP data capture example to work so we don't have to use the 2Mbps serial line which is painfully slow.

However, I'm stuck on the cell:

BOARD.connect_udp(
    board_addr=("192.168.22.40", 4660),
    receiver_addr=("192.168.22.129", 4660),
    # backend_addr=('127.0.0.1', 7878),  # Optional, if you want to connect to an external backend, only if you don't run `BOARD.start_server`
)
BOARD.connect_udp(
    board_addr=("192.168.22.40", 4660),
    receiver_addr=("192.168.22.129", 4660),
    # backend_addr=('127.0.0.1', 7878),  # Optional, if you want to connect to an external backend, only if you don't run `BOARD.start_server`
)

Getting errors about not establishing a connection:

Pre-error output:

2024-11-18 20:07:01,629 naludaq.board                  [INFO  ]: Connecting UDP with board_addr=('10.0.0.4', 4660), receiver_addr=('192.168.22.129', 4660), backend_addr=None
2024-11-18 20:07:01,629 urllib3.connectionpool         [DEBUG ]: Starting new HTTP connection (1): 127.0.0.1:58934
2024-11-18 20:07:01,630 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "GET /connection/info HTTP/1.1" 200 65
2024-11-18 20:07:01,632 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "PUT /server/data-format?model=hdsocv1_evalr2&events=fa5a&answers=cafe HTTP/1.1" 200 4
2024-11-18 20:07:01,632 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "GET /connection/info HTTP/1.1" 200 65
2024-11-18 20:07:01,633 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "PUT /connection/disconnect HTTP/1.1" 200 4
2024-11-18 20:07:01,634 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "PUT /connection/udp?board=10.0.0.4%3A4660&receiver=192.168.22.129%3A4660 HTTP/1.1" 400 54
2024-11-19T01:07:01.631913Z DEBUG ThreadId(22) run:run_packager_task_controller: src/workers/packager.rs:206: Starting packager: PackagerConfig { model: "hdsocv1_evalr2", event_stop_word: [250, 90], answer_stop_word: [202, 254] }
2024-11-19T01:07:01.631952Z DEBUG ThreadId(22) run_packager_impl: src/workers/packager.rs:256: Running package worker with config: PackagerConfig { model: "hdsocv1_evalr2", event_stop_word: [250, 90], answer_stop_word: [202, 254] }
2024-11-19T01:07:01.631957Z DEBUG ThreadId(22) run_packager_impl: src/workers/packager.rs:259: SELECTING HDSOC PACKAGER
2024-11-19T01:07:01.634374Z ERROR ThreadId(24) connect_udp: src/web_api/connection.rs:34: error=failed to open a connection state=ServerState { root: "/root/nalu_related/naluexamples/examples/output", workers: Workers { connection: ConnectionWorker { command_rx: Receiver, response_tx: Sender, from_board_tx: Sender, response_handler: WorkerResponseHandler { responses: RwLock { data: {} }, tx: Sender, rx: Receiver, timeout: 5s } }, package: PackageWorker { command_rx: Receiver, response_tx: Sender, events_tx: Sender, answers_tx: Sender, data_rx: Receiver, response_handler: WorkerResponseHandler { responses: RwLock { data: {} }, tx: Sender, rx: Receiver, timeout: 5s } }, storage: StorageWorker { root: "/root/nalu_related/naluexamples/examples/output", command_rx: Receiver, response_tx: Sender, events_rx: Receiver, response_handler: WorkerResponseHandler { responses: RwLock { data: {} }, tx: Sender, rx: Receiver, timeout: 5s } }, answer: AnswerWorker { answers_rx: Receiver, answers: Answers { answers: RwLock { data: BoundedHashMap { capacity: 128, map: {}, order: [] } } } } } } payload=UdpConnectionAddress { board: "10.0.0.4:4660", receiver: "192.168.22.129:4660" }
2024-11-18 20:07:01,629 naludaq.board                  [INFO  ]: Connecting UDP with board_addr=('10.0.0.4', 4660), receiver_addr=('192.168.22.129', 4660), backend_addr=None
2024-11-18 20:07:01,629 urllib3.connectionpool         [DEBUG ]: Starting new HTTP connection (1): 127.0.0.1:58934
2024-11-18 20:07:01,630 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "GET /connection/info HTTP/1.1" 200 65
2024-11-18 20:07:01,632 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "PUT /server/data-format?model=hdsocv1_evalr2&events=fa5a&answers=cafe HTTP/1.1" 200 4
2024-11-18 20:07:01,632 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "GET /connection/info HTTP/1.1" 200 65
2024-11-18 20:07:01,633 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "PUT /connection/disconnect HTTP/1.1" 200 4
2024-11-18 20:07:01,634 urllib3.connectionpool         [DEBUG ]: http://127.0.0.1:58934 "PUT /connection/udp?board=10.0.0.4%3A4660&receiver=192.168.22.129%3A4660 HTTP/1.1" 400 54
2024-11-19T01:07:01.631913Z DEBUG ThreadId(22) run:run_packager_task_controller: src/workers/packager.rs:206: Starting packager: PackagerConfig { model: "hdsocv1_evalr2", event_stop_word: [250, 90], answer_stop_word: [202, 254] }
2024-11-19T01:07:01.631952Z DEBUG ThreadId(22) run_packager_impl: src/workers/packager.rs:256: Running package worker with config: PackagerConfig { model: "hdsocv1_evalr2", event_stop_word: [250, 90], answer_stop_word: [202, 254] }
2024-11-19T01:07:01.631957Z DEBUG ThreadId(22) run_packager_impl: src/workers/packager.rs:259: SELECTING HDSOC PACKAGER
2024-11-19T01:07:01.634374Z ERROR ThreadId(24) connect_udp: src/web_api/connection.rs:34: error=failed to open a connection state=ServerState { root: "/root/nalu_related/naluexamples/examples/output", workers: Workers { connection: ConnectionWorker { command_rx: Receiver, response_tx: Sender, from_board_tx: Sender, response_handler: WorkerResponseHandler { responses: RwLock { data: {} }, tx: Sender, rx: Receiver, timeout: 5s } }, package: PackageWorker { command_rx: Receiver, response_tx: Sender, events_tx: Sender, answers_tx: Sender, data_rx: Receiver, response_handler: WorkerResponseHandler { responses: RwLock { data: {} }, tx: Sender, rx: Receiver, timeout: 5s } }, storage: StorageWorker { root: "/root/nalu_related/naluexamples/examples/output", command_rx: Receiver, response_tx: Sender, events_rx: Receiver, response_handler: WorkerResponseHandler { responses: RwLock { data: {} }, tx: Sender, rx: Receiver, timeout: 5s } }, answer: AnswerWorker { answers_rx: Receiver, answers: Answers { answers: RwLock { data: BoundedHashMap { capacity: 128, map: {}, order: [] } } } } } } payload=UdpConnectionAddress { board: "10.0.0.4:4660", receiver: "192.168.22.129:4660" }

Error:

---------------------------------------------------------------------------
ConnectionError                           Traceback (most recent call last)
Cell In[12], line 5
      2 board_ip = "10.0.0.4"
      3 receiver_ip = "192.168.22.129"
----> 5 BOARD.connect_udp(
      6     board_addr=(board_ip, 4660),
      7     receiver_addr=(receiver_ip, 4660),
      8     # backend_addr=('127.0.0.1', 7878),  # Optional, if you want to connect to an external backend, only if you don't run `BOARD.start_server`
      9 )

File /usr/local/lib/python3.10/dist-packages/naludaq/board/__init__.py:340, in Board.connect_udp(self, board_addr, receiver_addr, backend_addr)
    333 LOGGER.info(
    334     "Connecting UDP with board_addr=%s, receiver_addr=%s, backend_addr=%s",
    335     board_addr,
    336     receiver_addr,
    337     backend_addr,
    338 )
    339 self.connect_server(backend_addr)
--> 340 device = ConnectionManager(self).connect_udp(board_addr, receiver_addr)
    341 self.connection_info = device.info
    342 get_connection_controller(self).configure_connection()

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/managers/connection.py:88, in ConnectionManager.connect_udp(self, board_addr, receiver_addr, attempts)
     86 receiver_addr = ":".join(map(str, receiver_addr))
     87 arguments = {"board": board_addr, "receiver": receiver_addr}
---> 88 self._connect_with_attempts("udp", arguments, attempts)
     89 return UdpDevice(self.context)

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/managers/connection.py:214, in ConnectionManager._connect_with_attempts(self, type_name, params, attempts)
    212 self.disconnect()
    213 try:
--> 214     self.context.client.put(ROUTE, params=params)
    215 except HttpError:
    216     pass

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/client.py:51, in HttpClient.put(self, route, params, json)
     49 def put(self, route: str, *, params=None, json=None) -> requests.Response:
     50     """Send a PUT request to the server."""
---> 51     return self._request("put", route, params=params, json=json)

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/client.py:123, in HttpClient._request(self, method, route, **kwargs)
    121 except Exception as e:
    122     raise BackendError("The server sent a malformed response") from e
--> 123 error.raise_typed()

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/exceptions.py:52, in HttpError.raise_typed(self)
     50 message = f"[Status {self.status_code}, ID {self.error_id}] {self.message}"
     51 exception = type(message)
---> 52 raise exception

ConnectionError: [Status 400, ID 5] failed to open a connection
---------------------------------------------------------------------------
ConnectionError                           Traceback (most recent call last)
Cell In[12], line 5
      2 board_ip = "10.0.0.4"
      3 receiver_ip = "192.168.22.129"
----> 5 BOARD.connect_udp(
      6     board_addr=(board_ip, 4660),
      7     receiver_addr=(receiver_ip, 4660),
      8     # backend_addr=('127.0.0.1', 7878),  # Optional, if you want to connect to an external backend, only if you don't run `BOARD.start_server`
      9 )

File /usr/local/lib/python3.10/dist-packages/naludaq/board/__init__.py:340, in Board.connect_udp(self, board_addr, receiver_addr, backend_addr)
    333 LOGGER.info(
    334     "Connecting UDP with board_addr=%s, receiver_addr=%s, backend_addr=%s",
    335     board_addr,
    336     receiver_addr,
    337     backend_addr,
    338 )
    339 self.connect_server(backend_addr)
--> 340 device = ConnectionManager(self).connect_udp(board_addr, receiver_addr)
    341 self.connection_info = device.info
    342 get_connection_controller(self).configure_connection()

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/managers/connection.py:88, in ConnectionManager.connect_udp(self, board_addr, receiver_addr, attempts)
     86 receiver_addr = ":".join(map(str, receiver_addr))
     87 arguments = {"board": board_addr, "receiver": receiver_addr}
---> 88 self._connect_with_attempts("udp", arguments, attempts)
     89 return UdpDevice(self.context)

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/managers/connection.py:214, in ConnectionManager._connect_with_attempts(self, type_name, params, attempts)
    212 self.disconnect()
    213 try:
--> 214     self.context.client.put(ROUTE, params=params)
    215 except HttpError:
    216     pass

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/client.py:51, in HttpClient.put(self, route, params, json)
     49 def put(self, route: str, *, params=None, json=None) -> requests.Response:
     50     """Send a PUT request to the server."""
---> 51     return self._request("put", route, params=params, json=json)

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/client.py:123, in HttpClient._request(self, method, route, **kwargs)
    121 except Exception as e:
    122     raise BackendError("The server sent a malformed response") from e
--> 123 error.raise_typed()

File /usr/local/lib/python3.10/dist-packages/naludaq/backend/exceptions.py:52, in HttpError.raise_typed(self)
     50 message = f"[Status {self.status_code}, ID {self.error_id}] {self.message}"
     51 exception = type(message)
---> 52 raise exception

ConnectionError: [Status 400, ID 5] failed to open a connection

After reading the product sheet I noticed the part:

  1. Communication Interfaces:
    The system requires the use of a Micro USB cable to the Nexys Artix 7 Video Card for
    connecting and communicating with the ASIC.
    ● UART over USB, using virtual comport, up to 2M baud
    ● JTAG over USB for firmware updates
    ● Ethernet (Not yet available)

However, this product sheet was last updated in 2020. At this point, it seems there is no updated documentation on how to use this board with the naludaq python package. We need to talk with support.


18/11/2024 20:45

I did a network scan to try to find the board on 192.168.22.xxx but had no luck. It seems the computer's ethernet port is sending and recieving some packets though, meaning something is happening.

pioneer@pioneer-MS-7D41:~$ ifconfig
enp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.22.10  netmask 255.255.255.0  broadcast 192.168.22.255
        inet6 fe80::e616:f656:d20f:19a1  prefixlen 64  scopeid 0x20<link>
        ether 04:7c:16:78:ec:d2  txqueuelen 1000  (Ethernet)
        RX packets 13  bytes 780 (780.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1190  bytes 92266 (92.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 23701064  bytes 2893604250 (2.8 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23701064  bytes 2893604250 (2.8 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.47.95.44  netmask 255.255.0.0  broadcast 10.47.255.255
        inet6 fe80::febb:bcfe:69eb:ae8c  prefixlen 64  scopeid 0x20<link>
        ether f4:c8:8a:c1:4f:ad  txqueuelen 1000  (Ethernet)
        RX packets 202322600  bytes 51343973482 (51.3 GB)
        RX errors 0  dropped 2060  overruns 0  frame 0
        TX packets 2261409  bytes 379350954 (379.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pioneer@pioneer-MS-7D41:~$ 192.168.22.40
192.168.22.40: command not found
pioneer@pioneer-MS-7D41:~$ ping 192.168.22.40
PING 192.168.22.40 (192.168.22.40) 56(84) bytes of data.
^C
--- 192.168.22.40 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1017ms

pioneer@pioneer-MS-7D41:~$ sudo nmap -sn 192.168.22.0/24
Starting Nmap 7.80 ( https://nmap.org ) at 2024-11-18 20:19 EST
Nmap scan report for pioneer-MS-7D41 (192.168.22.10)
Host is up.
Nmap done: 256 IP addresses (1 host up) scanned in 10.50 seconds
pioneer@pioneer-MS-7D41:~$
pioneer@pioneer-MS-7D41:~$ ifconfig
enp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.22.10  netmask 255.255.255.0  broadcast 192.168.22.255
        inet6 fe80::e616:f656:d20f:19a1  prefixlen 64  scopeid 0x20<link>
        ether 04:7c:16:78:ec:d2  txqueuelen 1000  (Ethernet)
        RX packets 13  bytes 780 (780.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1190  bytes 92266 (92.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 23701064  bytes 2893604250 (2.8 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23701064  bytes 2893604250 (2.8 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.47.95.44  netmask 255.255.0.0  broadcast 10.47.255.255
        inet6 fe80::febb:bcfe:69eb:ae8c  prefixlen 64  scopeid 0x20<link>
        ether f4:c8:8a:c1:4f:ad  txqueuelen 1000  (Ethernet)
        RX packets 202322600  bytes 51343973482 (51.3 GB)
        RX errors 0  dropped 2060  overruns 0  frame 0
        TX packets 2261409  bytes 379350954 (379.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pioneer@pioneer-MS-7D41:~$ 192.168.22.40
192.168.22.40: command not found
pioneer@pioneer-MS-7D41:~$ ping 192.168.22.40
PING 192.168.22.40 (192.168.22.40) 56(84) bytes of data.
^C
--- 192.168.22.40 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1017ms

pioneer@pioneer-MS-7D41:~$ sudo nmap -sn 192.168.22.0/24
Starting Nmap 7.80 ( https://nmap.org ) at 2024-11-18 20:19 EST
Nmap scan report for pioneer-MS-7D41 (192.168.22.10)
Host is up.
Nmap done: 256 IP addresses (1 host up) scanned in 10.50 seconds
pioneer@pioneer-MS-7D41:~$

19/11/2024 16:15

Using these email from Marcus Luck of Nalu Scientific, I was able to connect to the HDSoc board over UDP

Hi Simone,

Thank you for forwarding this.

HDSoCv1 (32-channel) and v2 (64-channel) versions both support GbE.
I recommend a peer-to-peer connection to make it easier to troubleshoot.
The latest HDSoCv1 firmware is v938, it supports Gigabit Ethernet.

The firmware you need is found here:
HDSoCv1 Eval Rev. 2 | Nalu Scientific Support

First, replace the .bit file on the SD card, it's on the bottom of the Nexys FPGA board, accessible from the left side.

NaluScope has a built-in DAQ server, (it's possible to run the server as a stand-alone program if needed)
This is how to select using the built-in server in the connection dialog:
9e0b4593d6dbee43b8f1dd238406e965.png

The default IP address for the board is 192.168.1.59:4660
At the moment, we don't have DHCP on the board and the IP can't be changed.

The default Destination address in the Firmware is 192.168.1.165:4660

using NaluDAQ:
naluexamples/examples/udp_data_capture.ipynb at main · NaluScientific/naluexamples
The best examples are the externally triggered examples towards the end.
Please note the immediate trigger doesn't work well on the HDSoC boards due to the data rate.

Let me know if you have any further questions.

Cheers,
Marcus Luck
Lead Software Engineer

Nalu Scientific LLC

▬▬▬▬▬▬▬▬▬▬▬

M (503) 804-3900

E marcus@naluscientific.com

W www.naluscientific.com

I was able to follow these instructions. I setup the desktop's ethernet port to 192.168.1.1 with netmask 255.255.255.0 to see if I could see 192.168.1.59. Sure enough, I could ping it.

I then used naluscope to connec to the board and force some triggers to see some traces
fb20e89e36bb08b173ec076f73d98c32.png

bd9704b534fc1853c848c7092b4d6ec1.png


19/11/2024 18:32

I figured out how to plot the data nalu outputs. Basically you can just follow this notebook:

https://github.com/NaluScientific/naluexamples/blob/main/examples/opening_acquisitions.ipynb

Just point it to the correct acquisition notebook. (Note: I had to remove methods from naluexamples.helpers.plotting import get_color_mapping, set_plot_style and replace them becuase the helpers folder is missing from the github. They're just styling anyways).

Here's a really poor example plot:
78d10535213989a2cbda4478a124f7f8.png

The code that output this was in this notebook https://github.com/NaluScientific/naluexamples/blob/main/examples/udp_data_capture.ipynb

But the relevant parts were

with BOARD:
    get_readout_controller(BOARD).set_read_window(
        windows=8,
        lookback=8,
        write_after_trig=4,
    )
    get_readout_controller(BOARD).set_readout_channels(
        [0, 1, 2, 4]
    )  # Can be left out to read all channels
with BOARD:
    get_readout_controller(BOARD).set_read_window(
        windows=8,
        lookback=8,
        write_after_trig=4,
    )
    get_readout_controller(BOARD).set_readout_channels(
        [0, 1, 2, 4]
    )  # Can be left out to read all channels

and

with BOARD:
    get_board_controller(BOARD).start_readout(
        "imm"
    )  # Start readout in immediate mode, the board will trigger itself.
    try:
        time.sleep(3)
    finally:
        get_board_controller(BOARD).stop_readout()
with BOARD:
    get_board_controller(BOARD).start_readout(
        "imm"
    )  # Start readout in immediate mode, the board will trigger itself.
    try:
        time.sleep(3)
    finally:
        get_board_controller(BOARD).stop_readout()

Here you can see we specify channels 0,1,2,4 (which are the ones that show up). I can't really make sense of the delay, I guess the trigger fires "immediately" at some rate that's differenet for each channel?

In any event this will be useful to using python to plot output from the naluscope.


19/11/2024 18:38

I figured out how to "collect" the data within python

Again using this notebook:

The relevant code is:

from naludaq.tools.data_collector import get_data_collector
COLLECTOR = get_data_collector(BOARD)
# Don't forget you can always ask for help
help(COLLECTOR)
# Setting up the readout settings is a bit different with the data collector
COLLECTOR.channels = [0, 1, 2, 3]  # Can be left out to read all channels
COLLECTOR.forced = False  # IF True the board will readout based on memory address instead of trigger position. DON'T USE.
COLLECTOR.set_external_trigger()
COLLECTOR.set_window(
    windows=8,
    lookback=8,
    write_after_trig=4,
)
### Create a data capture pipeline
num_captures = 10
num_evt_to_throw_away = 10  # warmup captures


def validator(x):
    """A function that returns True if the data is valid, False otherwise."""
    return True


def inner(x):
    """When calling with enumerated data the argument is a tuple with the index in the block and the data."""
    idx = x[0]
    _ = x[1]  # The data
    print(f"Capturing event {idx + 1}/{num_captures}")


pipeline = COLLECTOR.iter_inf(attempts=10)
pipeline = pipeline.for_each(lambda _: print("Do something here with data"))
pipeline = pipeline.filter(validator, exclusion_limit=10)
pipeline = (
    pipeline.enumerate().for_each(inner).unenumerate()
)  # Example of how an event can be enumerated.
pipeline = pipeline.skip(num_evt_to_throw_away)
with BOARD:
    pipeline.take(num_captures).collect()
from naludaq.tools.data_collector import get_data_collector
COLLECTOR = get_data_collector(BOARD)
# Don't forget you can always ask for help
help(COLLECTOR)
# Setting up the readout settings is a bit different with the data collector
COLLECTOR.channels = [0, 1, 2, 3]  # Can be left out to read all channels
COLLECTOR.forced = False  # IF True the board will readout based on memory address instead of trigger position. DON'T USE.
COLLECTOR.set_external_trigger()
COLLECTOR.set_window(
    windows=8,
    lookback=8,
    write_after_trig=4,
)
### Create a data capture pipeline
num_captures = 10
num_evt_to_throw_away = 10  # warmup captures


def validator(x):
    """A function that returns True if the data is valid, False otherwise."""
    return True


def inner(x):
    """When calling with enumerated data the argument is a tuple with the index in the block and the data."""
    idx = x[0]
    _ = x[1]  # The data
    print(f"Capturing event {idx + 1}/{num_captures}")


pipeline = COLLECTOR.iter_inf(attempts=10)
pipeline = pipeline.for_each(lambda _: print("Do something here with data"))
pipeline = pipeline.filter(validator, exclusion_limit=10)
pipeline = (
    pipeline.enumerate().for_each(inner).unenumerate()
)  # Example of how an event can be enumerated.
pipeline = pipeline.skip(num_evt_to_throw_away)
with BOARD:
    pipeline.take(num_captures).collect()

I changed

def inner(x):
    """When calling with enumerated data the argument is a tuple with the index in the block and the data."""
    idx = x[0]
    _ = x[1]  # The data
    print(f"Capturing event {idx + 1}/{num_captures}")
def inner(x):
    """When calling with enumerated data the argument is a tuple with the index in the block and the data."""
    idx = x[0]
    _ = x[1]  # The data
    print(f"Capturing event {idx + 1}/{num_captures}")

to print the data (contained in the _ variable); I saw the traces. It was a lot of data, so here is the truncated version (first 100 characters of the data).

Do something here with data
{'window_labels': [[12, 13, 14, 15, 16, 17, 18, 19, 54, 55, 56, 57, 58, 59, 60, 61], [54, 55, 56, 57...
Capturing event 1/10
Do something here with data
{'window_labels': [[32, 33, 34, 35, 36, 37, 38, 39], [12, 13, 14, 15, 16, 17, 18, 19], [54, 55, 56, ...
Capturing event 2/10
Do something here with data
{'window_labels': [[12, 13, 14, 15, 16, 17, 18, 19], [54, 55, 56, 57, 58, 59, 60, 61], [34, 35, 36, ...
Capturing event 3/10
Do something here with data
{'window_labels': [[52, 53, 54, 55, 56, 57, 58, 59, 32, 33, 34, 35, 36, 37, 38, 39], [32, 33, 34, 35...
Capturing event 4/10
Do something here with data
{'window_labels': [[10, 11, 12, 13, 14, 15, 16, 17, 52, 53, 54, 55, 56, 57, 58, 59], [52, 53, 54, 55...
Capturing event 5/10
Do something here with data
{'window_labels': [[32, 33, 34, 35, 36, 37, 38, 39], [12, 13, 14, 15, 16, 17, 18, 19], [54, 55, 56, ...
Capturing event 6/10
Do something here with data
{'window_labels': [[10, 11, 12, 13, 14, 15, 16, 17, 52, 53, 54, 55, 56, 57, 58, 59], [52, 53, 54, 55...
Capturing event 7/10
Do something here with data
{'window_labels': [[30, 31, 32, 33, 34, 35, 36, 37, 10, 11, 12, 13, 14, 15, 16, 17], [10, 11, 12, 13...
Capturing event 8/10
Do something here with data
{'window_labels': [[50, 51, 52, 53, 54, 55, 56, 57, 30, 31, 32, 33, 34, 35, 36, 37], [30, 31, 32, 33...
Capturing event 9/10
Do something here with data
{'window_labels': [[8, 9, 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, 54, 55, 56, 57], [50, 51, 52, 53, ...
Capturing event 10/10
Do something here with data
{'window_labels': [[30, 31, 32, 33, 34, 35, 36, 37], [10, 11, 12, 13, 14, 15, 16, 17], [52, 53, 54, ...
Capturing event 11/10
Do something here with data
{'window_labels': [[8, 9, 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, 54, 55, 56, 57], [50, 51, 52, 53, ...
Capturing event 12/10
Do something here with data
{'window_labels': [[28, 29, 30, 31, 32, 33, 34, 35, 8, 9, 10, 11, 12, 13, 14, 15], [8, 9, 10, 11, 12...
Capturing event 13/10
Do something here with data
{'window_labels': [[48, 49, 50, 51, 52, 53, 54, 55, 28, 29, 30, 31, 32, 33, 34, 35], [28, 29, 30, 31...
Capturing event 14/10
Do something here with data
{'window_labels': [[6, 7, 8, 9, 10, 11, 12, 13, 48, 49, 50, 51, 52, 53, 54, 55], [48, 49, 50, 51, 52...
Capturing event 15/10
Do something here with data
{'window_labels': [[28, 29, 30, 31, 32, 33, 34, 35], [8, 9, 10, 11, 12, 13, 14, 15], [50, 51, 52, 53...
Capturing event 16/10
Do something here with data
{'window_labels': [[6, 7, 8, 9, 10, 11, 12, 13, 48, 49, 50, 51, 52, 53, 54, 55], [48, 49, 50, 51, 52...
Capturing event 17/10
Do something here with data
{'window_labels': [[26, 27, 28, 29, 30, 31, 32, 33, 6, 7, 8, 9, 10, 11, 12, 13], [6, 7, 8, 9, 10, 11...
Capturing event 18/10
Do something here with data
{'window_labels': [[46, 47, 48, 49, 50, 51, 52, 53, 26, 27, 28, 29, 30, 31, 32, 33], [26, 27, 28, 29...
Capturing event 19/10
Do something here with data
{'window_labels': [[4, 5, 6, 7, 8, 9, 10, 11, 46, 47, 48, 49, 50, 51, 52, 53], [46, 47, 48, 49, 50, ...
Capturing event 20/10
Do something here with data
{'window_labels': [[12, 13, 14, 15, 16, 17, 18, 19, 54, 55, 56, 57, 58, 59, 60, 61], [54, 55, 56, 57...
Capturing event 1/10
Do something here with data
{'window_labels': [[32, 33, 34, 35, 36, 37, 38, 39], [12, 13, 14, 15, 16, 17, 18, 19], [54, 55, 56, ...
Capturing event 2/10
Do something here with data
{'window_labels': [[12, 13, 14, 15, 16, 17, 18, 19], [54, 55, 56, 57, 58, 59, 60, 61], [34, 35, 36, ...
Capturing event 3/10
Do something here with data
{'window_labels': [[52, 53, 54, 55, 56, 57, 58, 59, 32, 33, 34, 35, 36, 37, 38, 39], [32, 33, 34, 35...
Capturing event 4/10
Do something here with data
{'window_labels': [[10, 11, 12, 13, 14, 15, 16, 17, 52, 53, 54, 55, 56, 57, 58, 59], [52, 53, 54, 55...
Capturing event 5/10
Do something here with data
{'window_labels': [[32, 33, 34, 35, 36, 37, 38, 39], [12, 13, 14, 15, 16, 17, 18, 19], [54, 55, 56, ...
Capturing event 6/10
Do something here with data
{'window_labels': [[10, 11, 12, 13, 14, 15, 16, 17, 52, 53, 54, 55, 56, 57, 58, 59], [52, 53, 54, 55...
Capturing event 7/10
Do something here with data
{'window_labels': [[30, 31, 32, 33, 34, 35, 36, 37, 10, 11, 12, 13, 14, 15, 16, 17], [10, 11, 12, 13...
Capturing event 8/10
Do something here with data
{'window_labels': [[50, 51, 52, 53, 54, 55, 56, 57, 30, 31, 32, 33, 34, 35, 36, 37], [30, 31, 32, 33...
Capturing event 9/10
Do something here with data
{'window_labels': [[8, 9, 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, 54, 55, 56, 57], [50, 51, 52, 53, ...
Capturing event 10/10
Do something here with data
{'window_labels': [[30, 31, 32, 33, 34, 35, 36, 37], [10, 11, 12, 13, 14, 15, 16, 17], [52, 53, 54, ...
Capturing event 11/10
Do something here with data
{'window_labels': [[8, 9, 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, 54, 55, 56, 57], [50, 51, 52, 53, ...
Capturing event 12/10
Do something here with data
{'window_labels': [[28, 29, 30, 31, 32, 33, 34, 35, 8, 9, 10, 11, 12, 13, 14, 15], [8, 9, 10, 11, 12...
Capturing event 13/10
Do something here with data
{'window_labels': [[48, 49, 50, 51, 52, 53, 54, 55, 28, 29, 30, 31, 32, 33, 34, 35], [28, 29, 30, 31...
Capturing event 14/10
Do something here with data
{'window_labels': [[6, 7, 8, 9, 10, 11, 12, 13, 48, 49, 50, 51, 52, 53, 54, 55], [48, 49, 50, 51, 52...
Capturing event 15/10
Do something here with data
{'window_labels': [[28, 29, 30, 31, 32, 33, 34, 35], [8, 9, 10, 11, 12, 13, 14, 15], [50, 51, 52, 53...
Capturing event 16/10
Do something here with data
{'window_labels': [[6, 7, 8, 9, 10, 11, 12, 13, 48, 49, 50, 51, 52, 53, 54, 55], [48, 49, 50, 51, 52...
Capturing event 17/10
Do something here with data
{'window_labels': [[26, 27, 28, 29, 30, 31, 32, 33, 6, 7, 8, 9, 10, 11, 12, 13], [6, 7, 8, 9, 10, 11...
Capturing event 18/10
Do something here with data
{'window_labels': [[46, 47, 48, 49, 50, 51, 52, 53, 26, 27, 28, 29, 30, 31, 32, 33], [26, 27, 28, 29...
Capturing event 19/10
Do something here with data
{'window_labels': [[4, 5, 6, 7, 8, 9, 10, 11, 46, 47, 48, 49, 50, 51, 52, 53], [46, 47, 48, 49, 50, ...
Capturing event 20/10

20/11/2024 20:20

I was able to make it so the appropriate firmware loads on boot with the following steps:

  1. Open hardware manager, connect to the board using JTAG interface (or microUSB interface)
  2. Convert the bitstream to flash:
    write_flash -force -file /path/to/output/firmware.bin -bitstream /path/to/input/firmware.bit
    write_flash -force -file /path/to/output/firmware.bin -bitstream /path/to/input/firmware.bit
    for example:
    write_flash -force -file /home/pioneer/vivado_stuff/Nexsys_Video_A7_For_HDSoc/HDSoC_eval_v938.bin -bitstream /home/pioneer/vivado_stuff/Nexsys_Video_A7_For_HDSoc/HDSoC_eval_v938.bit
    write_flash -force -file /home/pioneer/vivado_stuff/Nexsys_Video_A7_For_HDSoc/HDSoC_eval_v938.bin -bitstream /home/pioneer/vivado_stuff/Nexsys_Video_A7_For_HDSoc/HDSoC_eval_v938.bit
  3. Right click on the device, click add configuration memory device. Select part s25fl256sxxxxxx0-spi-x1_x2_x4
  4. It will then prompt to program flash memory. Select the generated bin file and continue. This takes a bit.
  5. After programming is complete, power down the device and power it back up. You should see some green lights on the HDSoC board appear indicating the firmware is loaded.